﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;

namespace SansaImageConverter
{
    /// <summary>
    /// Program
    /// </summary>
    static class Program
    {
		#region Fields (1) 

		// Public Static Fields (1) 

        /// <summary>
        /// Application settings.
        /// </summary>
        public static XmlSettings Settings = XmlSettings.Load();


		#endregion Fields 

		#region Other Subroutines (1) 

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 0)
            {
                Application.Run(new SettingsForm());
            }
            else
            {
                ProgressForm form = new ProgressForm();
                foreach (string item in args)
                {
                    if (Directory.Exists(item))
                        form.DirectoriesToConvert.Add(item);
                }

                Application.Run(form);
            }
        }

		#endregion Other Subroutines 
    }
}